home *** CD-ROM | disk | FTP | other *** search
- ERRMON
-
- By Robert J. Newton
-
- After experiencing a variety of problems with the hard disk on
- my AT, I decided that I wanted a more informative report of disk
- I/O errors than that provided by DOS. ERRMON is the result.
-
- ERRMON is a resident program which inserts itself in the INT 13
- chain. It then sits quietly watching for any error condition
- returned by the disk driver. When an error is detected, it
- springs to life and prints an error message on the screen. This
- message is in most cases far more informative than that provided
- by DOS. It then gracefully returns to the caller to let it do
- what it wishes with the error.
-
- Under the proper conditions ERRMON will let you know when DOS is
- making retries. However, ERRMON does not scroll the screen.
- This means that it is possible that a second message will overlay
- the first and you would not be aware of the retry unless the
- calling program causes a scroll.
-
- A word of caution. ERRMON has been written to respond to the
- error codes returned by the IBM BIOS disk drivers on the PC, XT
- and AT as shown in the various BIOS listings. Results with
- other drivers are totally unknown although it might be assumed
- that they map their error codes the same in order to achieve
- compatibility. There are no checks for machine or drive type.
-
- In addition, the errors defined for the PC/XT and AT fixed disk
- drivers are not the same in all cases. ERRMON responds to the
- codes for both. It is possible, but not likely, that say the AT
- could through some glitch return an error code that is not
- defined on the AT, but is on the XT. Instead of displaying an
- "Undefined error" message, ERRMON would display the message
- defined for the XT. This possibility was considered so remote
- that it was not trapped.
-
- The only error that ERRMON does not respond to is applicable
- only to the AT. Its floppy disk driver reports an error when a
- disk is changed. This is not a true i/o error and is ignored by
- ERRMON.
-
- ERRMON's overhead is essentially nil, only four instructions
- when there is no error. Approximately 1K of memory will be used,
- mostly for the message text.
-
- The video attribute for the error messages has been set to 0F,
- intense white. The messages will print in the lower right
- corner of the screen. You may change both of these by using
- DEBUG. The attribute byte is at offset 02EE and the screen line
- is at offset 02E2. Note that the screen line is relative to 0
-
- 1
-
-
-
-
-
- so that the last line is hex 18, decimal 24. For those with
- MASM, you may change the EQUATEs at the beginning. You may also
- change the message text, perhaps to shorten it so that less
- memory will be needed.
-
- Installation is simple, just type errmon. A successful
- installation will return ERRORLEVEL 0, unsuccessful will return
- 255. It can be installed by an AUTOEXEC.BAT, preferably after
- anything else which might place itself in the INT 13 chain. You
- can use >nul to avoid the sign on message.
-
-
-
- Error messages
-
- Sense failure (PC/XT only)
-
- Status error (AT only) - The controller status register returned
- an error condition, but the error register did not contain an
- error code.
-
- Write fault (AT only) - Indicates a hardware problem with the
- drive.
-
- Undefined error - An error code was returned for which BIOS has
- not defined an error.
-
- Drive not ready (AT only)
-
- No response - What DOS calls Drive not ready.
-
- Seek failure - An attempt to seek to the requested track was
- unsuccessful.
-
- Controller failure - Probably indicates that the controller could
- not successfully complete the requested command within the
- alloted time.
-
- EEC corrected data error - An information report that the
- controller's EEC algorithm successfully corrected a soft data
- error. You should copy the file and delete the original if this
- happens frequently.
-
- Bad CRC/EEC on read - The sector could not be successfully read.
- Retries should be made and if successful the file should be
- rewritten or copied which will usually cure the situation.
- Otherwise, use RECOVER.
-
- Bad track (PC/XT only) - An operation was attempted on a track
- flagged bad by the low level formatter. Such areas should have
- been marked bad in the FAT.
-
-
- 2
-
-
-
-
-
- Bad sector (AT only) - Similar to Bad track.
-
- Data crosses DMA boundary - This indicates a software problem;
- DMA cannot operate with more than 64K of data.
-
- DMA overrun - The controller could not get DMA access; a retry
- should succeed.
-
- Drive init failure - Probably indicates an attempt to initialize
- an invalid drive number.
-
- Drive reset failure - An attempt to reset the drive system
- failed.
-
- Sector not found - Bad news. The requested sector could not be
- found. Assuming the values were valid, this indicates a flawed
- disk. Absent a very capable disk zapper and the knowledge of its
- use, the only cure is a low level format. It is also possible
- that a disk made in one drive cannot be read in another because
- one of them is out of alignment.
-
- Diskette write protected - Take the tab off. If there is no tab
- the drive's sensors are probably bad.
-
- Address mark not found - Very bad news. See sector not found.
-
- Bad controller command - An invalid command was sent to the
- controller.
-
-
- ERRMON is (C) Copyright 1985 by Robert J. Newton, but hereby
- released to the public domain for private non-commercial use. It
- may be freely copied and distributed, but no consideration may be
- requested other than any customary handling fees charged by
- recognized user's groups. No warranties of any kind are provided
- and by using the program the user assumes all risk.